DROP TABLE IF EXISTS jms_ods.tab_scanstatistics ;
CREATE EXTERNAL TABLE jms_ods.tab_scanstatistics (
ID            string        comment  '' ,                     --NVARCHAR2(40)
PARSEDATE            timestamp        comment  '' ,                     --DATE
ORDERTYPE            string        comment  '' ,                     --NVARCHAR2(40)
ORDERSUBTYPE            string        comment  '' ,                     --NVARCHAR2(40)
ORDERSITE            string        comment  '' ,                     --NVARCHAR2(40)
ORDERCUSTOMER            string        comment  '' ,                     --NVARCHAR2(40)
ORDERCOUNT            bigint        comment  '' ,                     --NUMBER
SERVERNAME            string        comment  '' ,                     --NVARCHAR2(40)
FILENAME            string        comment  ''                      --NVARCHAR2(200)
)
    COMMENT  '扫描信息统计表'
    PARTITIONED BY (dt STRING COMMENT '时间分区')
    STORED AS PARQUET
    LOCATION '/dw/hive/jms_ods.db/external/tab_scanstatistics'
    TBLPROPERTIES (
        'discover.partitions' = 'false',
        'parquet.column.index.access' = 'true'
        );

MSCK REPAIR TABLE jms_ods.tab_scanstatistics;